﻿using System.Collections.Generic;
using Wombat.Core.Factories;
using Wombat.Core.Services;

namespace Wombat.Core.Gates
{
    public class CodeBlockExecuterGate: CodeExecuterGate
    {
        public delegate CodeBlockExecuterGate Factory();

        public CodeBlockExecuterGate(IDynamicCodeServicePeer dynamicCodeServicePeer, ITagStateService tagStateService, ITagValueFactory tagValueFactory, IObservationManager observationManager) : base(dynamicCodeServicePeer, tagStateService, tagValueFactory, observationManager)
        {
        }

        protected override object ExecuteCode(IDictionary<string, object> inputParameters)
        {
            return DynamicCodeServicePeer.Execute(inputParameters);
        }
    }
}
